package com.java.java8.interfacedemo;

/**
 * @author liyanhao
 * @Date 2023-02-25 12:39
 */
public interface InterfaceDemo {
    default double sqrt(int a){
        return Math.sqrt(a);
    }
}

class InterfaceDemoClass implements InterfaceDemo {
    public static void main(String[] args) {
        InterfaceDemoClass interfaceDemoClass = new InterfaceDemoClass();
        double sqrt = interfaceDemoClass.sqrt(4);
        System.out.println(sqrt);
    }
}

